<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>分期订单列表</title>
<link href="${base}/resource/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resource/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resource/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resource/admin/js/list.js"></script>
<script type="text/javascript" src="${base}/resource/admin/datePicker/WdatePicker.js"></script>
<script type="text/javascript">
$().ready(function() {
	[@flash_message /]
});
</script>
</head>
<body>
    <!-- 地址导航-->
	<div class="path">
		<a href="${base}/admin/common/index.do">首页</a> &raquo;分期购订单<span>${page.total}</span>
	</div>
    <!-- 主体-->
	<form id="listForm" action="list.do" method="get">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        SN：<input type="text" name="like_sn"  class="text"  value="${like_sn}" />
                    </td>
                    <td>
                        证件号码：<input type="text" name="like_cardNo"  class="text"  value="${like_cardNo}" />
                    </td>
                    <td>
                        手机号码：<input type="text" name="eq_phone"  class="text"  value="${eq_phone}" />
                    </td>
                    <td>
                        开始时间：<input type="text" id="beginDate" name="gt_datetime_createDate" class="text Wdate" readonly="readonly"  value="[#if gt_datetime_createDate??]${gt_datetime_createDate?string("yyyy-MM-dd HH:mm:ss")}[#else]${beginData?string("yyyy-MM-dd HH:mm:ss")}[/#if]" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss', maxDate: '#F{$dp.$D(\'endDate\')}' });"/>
                    </td>
                    <td>
                        结束时间：<input type="text" id="endDate" name="lt_datetime_createDate" class="text Wdate"  readonly="readonly"   value="[#if lt_datetime_createDate??]${lt_datetime_createDate?string("yyyy-MM-dd HH:mm:ss")}[#else]${endData?string("yyyy-MM-dd HH:mm:ss")}[/#if]"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate: '#F{$dp.$D(\'beginDate\')}',maxDate: '${currentDate}'});"/>
                    </td>
                    <td>
                        <button type="submit">检索</button>
                    </td>
                </tr>
            </table>
        </div>
		<div class="bar">
			<a href="add" class="iconButton">
				<span class="addIcon">&nbsp;</span>添加
			</a>
			<div class="buttonWrap">
				<a href="javascript:;" id="refreshButton" class="iconButton">
					<span class="refreshIcon">&nbsp;</span>刷新
				</a>
                <a href="export.do" id="exportExcel"  class="iconButton">
                    <span class="">&nbsp;</span>导出Excel
                </a>
				<div class="menuWrap">
					<a href="javascript:;" id="pageSizeSelect" class="button">
					    每页条数<span class="arrow">&nbsp;</span>
					</a>
                    <div class="popupMenu">
                        <ul id="pageSizeOption">
                            <li>
                                <a href="javascript:;"[#if page.numPerPage == 10] class="current"[/#if] val="10">10</a>
                            </li>
                            <li>
                                <a href="javascript:;"[#if page.numPerPage == 20] class="current"[/#if] val="20">20</a>
                            </li>
                            <li>
                                <a href="javascript:;"[#if page.numPerPage == 50] class="current"[/#if] val="50">50</a>
                            </li>
                            <li>
                                <a href="javascript:;"[#if page.numPerPage == 100] class="current"[/#if] val="100">100</a>
                            </li>
                        </ul>
                    </div>
				</div>
			</div>
		</div>
		<table id="listTable" class="list">
			<tr>
				<th class="check">
					<input type="checkbox" id="selectAll" />
				</th>
                <th>
                    <span>SN(平台)</span>
                </th>
                <th>
                    <span>SN(银行)</span>
                </th>
				<th>
                    <span>姓名</span>
				</th>
                <th>
                    <span>身份证号码</span>
                </th>
                <th>
                    <span>性别</span>
                </th>
                <th>
                    <span>还款金额</span>
                </th>
                <th>
                    <span>月付</span>
                </th>
                <th>
                    <span>手机号</span>
                </th>
                <th>
                    <span>提交状态</span>
                </th>
                <th>
                    <span>审批状态</span>
                </th>
                <th>
                    <span>订单状态</span>
                </th>
                <th>
                    <span>创建时间</span>
                </th>
                <th>操作</th>
			</tr>
			[#list page.content as entity]
				<tr>
					<td>
						<input type="checkbox" name="ids" value="${entity.id}" />
					</td>
                    <td>
                    ${entity.sn}
                    </td>
                    <td>
                    ${entity.bankSn}
                    </td>
					<td>
						${entity.name}
					</td>
                    <td>
                        ${entity.cardNo}
                    </td>
                    <td>
                        [#if entity.sex=0]男 [#else ]女[/#if]
                    </td>
                    <td>
                          ${entity.total}
                    </td>
                    <td>
                         ${entity.loanMonPay}
                    </td>
                    <td>
                         ${entity.phone}
                    </td>
                    <td>
                        [#if entity.submitStatus=0]<b style="color: #CC0000">未提交</b>[/#if]
                        [#if entity.submitStatus=1]已提交[/#if]
                    </td>
                    <td>
                        [#--审批状态--]
                        [#if entity.approveStatus=0]未开始[/#if]
                        [#if entity.approveStatus=1]<b style="color: green;">成功</b>[/#if]
                        [#if entity.approveStatus=2]<b style="color: #cc0000">失败</b>[/#if]
                        [#if entity.approveStatus=3]<b style="color: #cc0000">打回(${entity.approveMsg})</b>[/#if]
                    </td>
                    <td>
                        [#--订单状态--]
                        [#if entity.orderStatus=0]未开始[/#if]
                        [#if entity.orderStatus=1]完成[/#if]
                        [#if entity.orderStatus=3]取消[/#if]
                    </td>
                    <td>
                         ${entity.createDate?string("yyyy-MM-dd HH:mm:ss")}
                    </td>
                    <td>
                        <a href="view?id=${entity.id}">[查看]</a>
                        [#if entity.submitStatus=0]<a href="edit?id=${entity.id}">[编辑]</a>[/#if]
                        [#if entity.approveStatus=3]<a href="edit?id=${entity.id}">[编辑]</a>[/#if]
                    </td>
				</tr>
			[/#list]
		</table>
       [@pagination pageNumber = page.pageNumber totalPages = page.totalPages]
             [#include "/common/pagination.ftl"]
       [/@pagination]

	</form>

    <script type="text/javascript">
        $(function(){
            $("#exportExcel").click(function(){
                var $form = $("#listForm");
                $form.attr("action","export.do")
                $form.submit();
                return false;
            });
        });
    </script>

</body>
</html>
